#ifndef _AME_MOB_H_
#define _AME_MOB_H_

struct world_mob {
	unsigned int id;
	unsigned short subid;
	char name[16];
	struct world_cell *cell;
	struct chain_node *target;
	struct chain_node *world_node;
	struct {
		unsigned hp: 32;
		unsigned sp: 32;
		unsigned walking: 1;
		unsigned attacking: 1;
		unsigned chatting: 1;
		unsigned dead: 1;
	} status;
	struct {
		unsigned wspeed: 4; // Walking speed
		unsigned aspeed: 4; // Attack speed
		unsigned f_damage: 4; // Phisical damage 0-100%
		unsigned m_damage: 4; // Magical damage 0-100%
		unsigned f_def: 4; // Phisical defence 0-100%
		unsigned	m_def: 4; // Defence from magic 0-100%
		unsigned view_radius: 4;
		unsigned int_: 4; // Inteligence  - Magii stat
		unsigned dex_: 4; // Dexterity    - Range stat
		unsigned str_: 4; // Strength     - Rogue stat
		unsigned vit_: 4; // Vitality     - Melee stat
		unsigned res_: 4; // Resistance \
		unsigned chr_: 4; // Charisma   / trash stats
	} stats;
};

/* AI sorta, sorta AI */
int mob_sees_char (struct world_mob *, struct world_char *);
int mob_do(struct world_mob *);
int mob_random_walk(struct world_mob *);

#endif
